﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WebUtils
{
    public class Product
    {

        public class Fields
        {
            public const int Code = 9;
            public const int Price = 12;
            public const int Name = 10;
            public const int Date = 2;
        }

        public string Code { get; set; }

        /// <summary>
        /// Price as text
        /// </summary>
        public string PriceText { get; set; }

        /// <summary>
        /// Gets price from text
        /// </summary>
        public Decimal Price { get { return Decimal.Parse(PriceText.Trim()); } }

        public string Name { get; set; }

    }
}
